package com.fy56.platform.goodsTracking.service.impl;

import com.dexcoder.dal.JdbcDao;
import com.fy56.platform.goodsTracking.model.SysTenant;
import com.fy56.platform.goodsTracking.service.TenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by XTK on 2016-08-18.
 */
@Repository
public class TenantServiceImpl implements TenantService {
    @Autowired
    JdbcDao jdbcDao_sys;

    @Override
    public List QueryAllTenant() {
        List<SysTenant> sysTenant = null;
        sysTenant = jdbcDao_sys.queryListForSql("select distinct sys_Server.DataSource,sys_database.DatabaseName,userinfo.WxPublicNumber wxpublicnumber ,userinfo.appid appid from userinfo left join sys_database on sys_database.DatabaseID=userinfo.databaseid " +
                "left join sys_Server on sys_Server.ServerID=sys_database.ServerID where userinfo.ServiceStatus='启用'", SysTenant.class);
        return sysTenant;
    }
}
